package com.cjx.minio.feign.impl;

import com.cjx.common.api.CommonResult;
import com.cjx.minio.dto.FileManagementDTO;
import com.cjx.minio.feign.FileManagementClient;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

/**
 * @author cjx
 * @version 1.0.0
 * @date 2020/09/28  10:16:00
 * @doc 文件管理客户机降级异常处理类
 */
@Component
public class FileManagementClientImpl implements FileManagementClient {

    @Override
    public CommonResult<FileManagementDTO> uploadFile(MultipartFile file, String userId, Long canPreview) {
        return CommonResult.failed("上传文件失败!");
    }

    @Override
    public CommonResult getFileManagementById(String fileId) {
        return CommonResult.failed("获取文件信息失败!");
    }

    @Override
    public CommonResult getFileManagementByIds(String fileIds) {
        return CommonResult.failed("获取多个文件信息失败！");
    }

    @Override
    public CommonResult deleteFileManagementById(String fileId) {
        return CommonResult.failed("删除文件失败！");
    }

    @Override
    public CommonResult deleteFileManagementByIds(String fileIds) {
        return CommonResult.failed("删除多个文件失败！");
    }

    @Override
    public CommonResult<String> downloadFile2Base64(String fileId) {
        return CommonResult.failed("下载文件失败！");
    }

    @Override
    public CommonResult downloadFile(String fileId, HttpServletResponse response) {
        return CommonResult.failed("下载文件失败！");
    }
}
